package com.sskj.mine.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.common.util.ToastUtil;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.bean.VerificationBean;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.ui.activity.MineVerficationJuniorActivity;

public class MineVerificationJuniorPresenter extends BasePresenter<MineVerficationJuniorActivity> {

    public void verificationJunior(String id, String username, String idCardNo) {
        httpService.verificationJunior(id, username, idCardNo)
                .execute(new JsonCallBack<HttpData<VerificationBean>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<VerificationBean>> response) {
                        HttpData httpData = response.body();
                        ToastUtil.showShort(httpData.getMsg());
                        if (httpData.getStatus() == HttpConfig.OK) {
//                            mView.onSubmitVerifyResponseSuccess();
                            mView.finish();
                        }
                    }
                });
    }

}
